#!/usr/bin/perl
use strict;
use warnings;

use ExtUtils::Packlist;
use ExtUtils::Installed;

$ARGV[0] or die "Usage : $0 Module::Name\n";


my $inst = ExtUtils::Installed->new();

print "Try to remove : $module\n";
foreach my $fil (sort($inst->files($ARGV[0]))) {
	print "removing : $fil\n";
	unlink $fil;
}

my $packfile = $inst->packlist($ARGV[0])->packlist_file();
	print "removing : $packfile\n";
	unlink $packfile;
}
exit 0;
